Panoramic photography has become a popular and useful way to capture images. One type of panoramic image is known as a photo sphere. As an example, photo spheres may include imagery that covers the whole or portion of a sphere of view captured by a camera. For instance, a photo sphere may have a field of view that captures 360° of the features visible to the camera in both the horizontal and vertical directions. Each portion of the imagery may be associated with a relative angle value. By way of example, vertical directions may be referenced relative to a gravity vector, where 0° in the vertical direction may correspond with the horizon, −90° in the vertical direction may represent the view looking straight down and 90° in the vertical direction may represent the view looking straight up. Horizontal directions may correspond with compass bearings. For instance, 0° in the horizontal direction may correspond with due north, and 90°, 180° and 270° in the horizontal direction may correspond with due east, south and west, respectively. The horizontal coordinate of the photo sphere corresponds with an azimuth angle, and the vertical coordinate corresponds with an elevation angle.
The orientation of the sphere relative to compass bearings may be measured and stored based upon readings from a magnetic compass. For example, at the time the user of a mobile device (such as a phone) begins capturing a scene with the device's camera for the purpose of creating a photo sphere, the device may identify the orientation based on the device's internal compass and the gravity vector based on the device's internal accelerometer. The orientation may be defined with respect to a vector that is orthogonal to the gravity vector and points north. The orientation may also be identified by using a device's gyroscope to measure changes in the device's yaw relative to an initial compass bearing. The device may also store the date, time and geographic location at the time of capture as well.
Various factors may interfere with the accuracy of the information received from the device's location devices, such as the compass, GPS, accelerometer, etc. For instance, many magnetic compasses require periodic calibration to maintain accuracy and reduce accumulated magnetic effect. Moreover, neighboring concrete-steel structures or mineral deposits may distort the magnetic field at the capture location. Additionally, poor or no signal reception may affect the accuracy of location provided by the GPS.
The orientation of the photo sphere may be used when displaying the photo sphere to users. For example, a viewer may request to view a specific direction of a photo sphere (e.g., either by interacting with the photo sphere itself, through a map-based control, programmatically, etc.).